@extends('frontend/layouts/flaty_to_bootstrap')

@section('content.titley')
Show Parts [{{  $parts->id }}] ::
@parent
@stop

    @section('content.breadcrumb.inner')
    <li><a href="{{  route('home') }}"><i class="icon-home"></i> Dashboard</a><span class="divider"><i class="icon-angle-right"></i></span></li>
    <li><a href="{{  route('car_balance.parts.index') }}"><i class="icon-home"></i> Parts list</a><span class="divider"><i class="icon-angle-right"></i></span></li>
    <li class="active">Show Parts [{{  $parts->id }}] </li>
    @stop

@section('content.main')

<p>{{ link_to_route('car_balance.parts.index', 'Back to Parts list', null, array('class' => 'btn btn-info')) }}</p>

<div class="row-fluid">
<table class="table table-bordered">

</table>

    <table class="table table-striped table-bordered">
        <col width="35%">
        <col width="60%">
        <tbody>
                <tr> <th>Id</th> <td>{{  $parts->id }}</td> </tr>
                <tr> <th>Purchase_Date</th> <td>{{  $parts->purchase_date }}</td> </tr>
                <tr> <th>Parts_Name</th> <td>{{  $parts->parts_name }}</td> </tr>
                <tr> <th>Seller</th> <td>{{  $parts->seller }}</td> </tr>
                <tr> <th>Seller_Send_Type</th> <td>{{  $parts->seller_send_type }}</td> </tr>
                <tr> <th>Recieve_Date</th> <td>{{  $parts->recieve_date }}</td> </tr>
                <tr> <th>Pickup_Car_Chassis_Number</th> <td>{{  $parts->pickup_car_chassis_number }}</td> </tr>
                <tr> <th>Payment_Type</th> <td>{{  $parts->payment_type }}</td> </tr>
                <tr> <th>Payment_Commission</th> <td>{{  $parts->payment_commission }}</td> </tr>
                <tr> <th>Payment_Date</th> <td>{{  $parts->payment_date }}</td> </tr>
                <tr> <th>Price</th> <td>{{  $parts->price }}</td> </tr>
                <tr> <th>Delivery_Fee</th> <td>{{  $parts->delivery_fee }}</td> </tr>
                <tr> <th>Commission</th> <td>{{  $parts->commission }}</td> </tr>
                <tr> <th>Fee_Mongol</th> <td>{{  $parts->fee_mongol }}</td> </tr>
                <tr> <th>Comment</th> <td>{{  $parts->comment }}</td> </tr>
                <tr> <th>Cancel_Flag</th> <td>{{  $parts->cancel_flag }}</td> </tr>
        
                                    <tr>
                    <th>Customer</th>
                    <td>{{  $parts->customer()->first() ? link_to_route('car_balance.customer.show', $parts->customer()->first()->name, array('id' => $parts->customer()->first()->id), array()) : 'NULL' }}</td>
                </tr>
                            <tr>
                    <th>Car Auction</th>
                    <td>{{  $parts->carAuction()->first() ? link_to_route('car_balance.car_auction.show', $parts->carAuction()->first()->name, array('id' => $parts->carAuction()->first()->id), array()) : 'NULL' }}</td>
                </tr>
                    
        <tr><td colspan="2">
                                    @if ( ! is_null($parts->deleted_at))
                    <a href="{{  route('car_balance.parts.restore', $parts->id) }}" class="btn btn-mini btn-warning">Restore</a>
                    @else
                    <a href="{{  route('car_balance.parts.delete', $parts->id) }}" class="btn btn-mini btn-danger">Delete</a>
                    @endif
                            </td></tr>
        </tbody>
    </table>
@stop